import { EggAppConfig, PowerPartial } from 'egg';

export default () => {
  const config: PowerPartial<EggAppConfig> = {};

  config.mongoose = {
    url: 'mongodb+srv://caihongquan:caihongquan.1@cluster0-xlxua.mongodb.net/quickSearch_dev?retryWrites=true&w=majority',
    options: {
      user: 'caihongquan',
      pass: 'caihongquan.1',
      reconnectTries: Number.MAX_VALUE,
      reconnectInterval: 500,
      poolSize: 10,
      bufferMaxEntries: 0,
      useUnifiedTopology: true,
    },
  };

  return config;
};
